import 'package:flutter/material.dart';

var alertDialog = (context) async {
  var result = await showDialog(
      barrierDismissible: false, //表示点击灰色背景的时候是否消失弹出框
      context: context,
      builder: (context) {
        return AlertDialog(
          title: const Text("提示信息!"),
          content: const Text("您确定要删除吗?"),
          actions: <Widget>[
            TextButton(
              child: const Text("取消"),
              onPressed: () {
                print("取消");
                Navigator.pop(context, 'Cancle');
              },
            ),
            TextButton(
              child: const Text("确定"),
              onPressed: () {
                print("确定");
                Navigator.pop(context, "Ok");
              },
            )
          ],
        );
      });
  print(result);
};
